import cv2 as cv
import numpy as np

img  = cv.imread('../data/jWithBlackNoiseLeft.png')
kernel = np.ones((5, 5), np.uint8)

closing = cv.morphologyEx(img, cv.MORPH_CLOSE, kernel)

cv.imshow('img',img)
cv.imshow('closing', closing)

cv.waitKey(0)
cv.destroyAllWindows()